﻿<custom:FbWindow
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:custom="clr-namespace:Feedbook.Custom"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="Feedbook.Views.RSSDiscovery"
        x:ClassModifier="internal"
        Title="RSS Discovery" Height="100.809" Width="360.333" Background="{x:Null}" WindowStartupLocation="CenterOwner" SizeToContent="Height" WindowStyle="None" AllowsTransparency="True" Icon="/Feedbook;component/Images/FBIcon.png">
    <custom:FbWindow.Resources>		
		   <DataTemplate x:Key="SubscribeTemplate">
            <Button Margin="5" Template="{DynamicResource TransparentButtonTemplate}" Click="SubscribeButton_Click" HorizontalAlignment="Stretch" Cursor="Hand">
                <Grid HorizontalAlignment="Stretch">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition Width="auto"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="{Binding Channel.Title.ToPlainText}" TextWrapping="Wrap" Foreground="{DynamicResource ContrastBrush}" FontSize="16" Margin="0,0,5,0"/>
                    <Image Width="20" Height="20" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right" Visibility="{Binding IsSubscribed, Converter={StaticResource BoolToVisibilityConverter}}" Source="/Feedbook;component/Images/Check-32.png"/>
                    <Image Width="20" Height="20" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right" Visibility="{Binding IsSubscribed, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=True}" Source="/Feedbook;component/Images/Add-32.png"/>
                </Grid>
            </Button>
        </DataTemplate>
    </custom:FbWindow.Resources>
    <Border Style="{DynamicResource WindowContainerDialogStyle}">
    	<Grid>
    		<Grid.RowDefinitions>
    			<RowDefinition Height="Auto" MinHeight="66"/>
    			<RowDefinition/>
    		</Grid.RowDefinitions>
    		<ProgressBar x:Name="ProgressBar" HorizontalAlignment="Left" Height="4" VerticalAlignment="Top" Width="234" Margin="29,52.733,0,0" Background="{x:Null}" BorderBrush="{x:Null}" Visibility="{Binding IsIndeterminate, Converter={StaticResource BoolToVisibilityConverter}, RelativeSource={RelativeSource Self}}"/>
    		<TextBox x:Name="UrlTextBox" HorizontalAlignment="Left" Margin="29,29,0,0" Width="234" FontSize="13.333" Background="{x:Null}" Foreground="{DynamicResource ContrastBrush}" VerticalAlignment="Top" CaretBrush="{DynamicResource ContrastBrush}" ToolTip="Web site url"/>
    		<Button Content="Go" Template="{DynamicResource FBButtonTemplate}" FontSize="16" VerticalAlignment="Top" HorizontalAlignment="Left" Padding="8,1" Margin="277,27,0,0" Click="GoButton_Click" IsDefault="True"/>
            <ListBox x:Name="ChannelListBox" Grid.Row="1" Background="{x:Null}" BorderBrush="{x:Null}" ItemTemplate="{StaticResource SubscribeTemplate}" HorizontalAlignment="Center" MaxWidth="476" Margin="0,7,0,34" VerticalAlignment="Top" MaxHeight="183"/>
            <Button x:Name="CloseButton" Content="Ñ" HorizontalAlignment="Right" Width="Auto" FontFamily="Wingdings 2" Template="{DynamicResource TransparentFBButtonTemplate}" VerticalAlignment="Top" Foreground="{DynamicResource ContrastBrush}" FontSize="16" Click="CloseButton_Click" Cursor="Hand" Margin="0,5,6,0"/>
            <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="RSS Discovery" VerticalAlignment="Top" Foreground="{DynamicResource ContrastBrush}" FontSize="16" FontStyle="Italic" Margin="28,4,0,0"/>
    	</Grid>
    </Border>
</custom:FbWindow>
